package com.custom.web.base;

import com.custom.action.service.DbServiceHelper;
import com.custom.comm.page.DbPageRows;
import com.custom.comm.utils.back.BackResult;

import java.util.List;

/**
 * @author XiaoBai
 * @since 2024/3/3 0003 15:07
 */
public interface ControllerHandler<Param, T> extends DbServiceHelper<T> {

    void addBefore(BackResult<?> res, T item);

    void addAfter(BackResult<?> res, T item);

    void deleteIdBefore(BackResult<?> res, T delData);

    void deleteIdAfter(BackResult<?> res, T delData);

    void deleteIdsBefore(BackResult<?> res, List<T> delDataList);

    void deleteIdsAfter(BackResult<?> res, List<T> delDataList);

    void updateBefore(BackResult<?> res, T item);

    void updateAfter(BackResult<?> res, T item);

    void queryOneAfter(BackResult<?> res, T item);

    void queryPageBefore(BackResult<?> res, Param param);

    void queryPageAfter(BackResult<?> res, Param param, DbPageRows<T> pageRows);

}
